HEADER counter
{
	// A simple script showing how to use local string variables...
	// And a counter...
	// By Mauro Grassi...
}

SCRIPT counter
{
	// The following is a local string variable...
	*U=" events...";
	// Open a counter on input #D0, it counts falling edges...
	// Opening the counter also clears it, ie. sets it to 0...
	@@openFallingCounter(#D0);
	// Remember the last count...
	while(1) 
	{
		*A="The Counter is up to ", @@readCounter(#D0);
		print *A, *U, newline;
		sleep(1);
	}
}
